package com.cyf.pay.alipay.service;

import com.alipay.api.domain.AlipayTradeAppPayModel;
import com.alipay.api.domain.AlipayTradeQueryModel;
import com.alipay.api.response.AlipayTradeAppPayResponse;
import com.alipay.api.response.AlipayTradePrecreateResponse;
import com.alipay.api.response.AlipayTradeQueryResponse;

import java.util.Map;

/**
 * 支付宝支付接口
 * Created by cage on 2017/2/27.
 */
public interface AlipayService {
    /**
     * app支付宝支付：统一下单
     * @param model 下单请求
     * @return 下单后返回信息
     */
    AlipayTradeAppPayResponse unifiedOrder(AlipayTradeAppPayModel model);

    /**
     * app支付宝支付：异步结果通知
     * @param params
     * @return
     */
    String payNotify(Map<String, String> params);

    /**
     * app支付宝支付：查询交易结果
     * @param model
     * @return
     */
    AlipayTradeQueryResponse queryOrder(AlipayTradeQueryModel model);

    /**
     * 获取二维码码串
     * @param orderNo   订单号
     * @param fee       费用
     * @param subject 商品名称
     * @return AlipayTradePrecreateResponse
     */
    AlipayTradePrecreateResponse getQrcode(String orderNo, String fee, String subject);
}
